package translate;
import temp.*;
import tree.*;
public abstract class Cx extends Exp{
	tree.Exp exp;
	Cx(tree.Exp e){exp = e;}
	
	tree.Exp unEx() {
		Temp r = new Temp();
		Label t = new Label();
		Label f = new Label();

		return new ESEQ(
		new SEQ(
				new MOVE(new TEMP(r), new CONST(1)), 
				new SEQ(unCx(t,f), 
						new SEQ(new LABEL(f), 
								new SEQ(new MOVE(new TEMP(r),new CONST(0)),	
										new LABEL(t))
								)
						)
				), 
		new TEMP(r));
	}
	
	abstract tree.Stm unCx(Label t, Label f);
	
	tree.Stm unNx(){
		
	}
}



